package cn.csc.module.product.api.stocklock.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

/**
 * 锁定库存请求参数
 * @author liuchuang
 * @version 1.0
 * @date 2024/1/25 14:19
 * @modify
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SkuStockLockReqDTO {

    @NotNull(message = "产品ID不能为空")
    @ApiModelProperty(value = "产品ID" )
    private BigInteger spuId;

    @NotNull(message = "skuId不能为空")
    @ApiModelProperty(value = "skuId" )
    private BigInteger skuId;

    @NotNull(message = "orderId不能为空")
    @ApiModelProperty(value = "orderId" )
    private BigInteger orderId;

    @NotNull(message = "商品数量不能为空")
    @Min(value = 1,message = "商品数量不能为空")
    @ApiModelProperty(value = "商品数量" )
    private Integer count;



}
